package com.weakteam.mobile.minimum.fragment;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

import com.weakteam.mobile.minimum.R;
import com.weakteam.mobile.minimum.common.util.SimpleLog;
import com.weakteam.mobile.minimum.ui.widget.MenuLayout;

/**
 * Created by Nail on 29.11.2014.
 */
public class MainScreen extends Fragment {

    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_main, null);
    }

    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        final MenuLayout menuLayout = (MenuLayout)getActivity().findViewById(R.id.menu_layout);

        final FrameLayout menuButton = (FrameLayout)getActivity().findViewById(R.id.menuButton);
        menuButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                SimpleLog.info("Click");
                menuLayout.toggleMenu();
            }
        });
    }

    public void onResume() {
        super.onResume();
    }


}